class Solution {
    public boolean isUnique(String astr) {
        int[] arr = new int[26];
        char[] s = astr.toCharArray();
        boolean flag = true;
        for (char c : s) {
            if (arr[c - 'a'] == 1) {
                flag = false;
            }
            arr[c - 'a'] = 1;
        }
        return flag;
    }
}